package com.ruoyi.association.service.impl;

import com.ruoyi.association.domain.CustomerCollectDynamic;
import com.ruoyi.association.mapper.CustomerCollectDynamicMapper;
import com.ruoyi.association.service.ICustomerCollectDynamicService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 评价订单 业务层处理
 * 
 * @author ruoyi
 */
@Service
public class CustomerCollectDynamicServiceImpl implements ICustomerCollectDynamicService
{
    private static final Logger log = LoggerFactory.getLogger(CustomerCollectDynamicServiceImpl.class);

    @Autowired
    private CustomerCollectDynamicMapper customerCollectDynamicMapper;

    /**
     * 根据条件分页查询关联列表
     *
     * @param customerCollectDynamic 关联信息
     * @return 关联信息集合信息
     */
    @Override
    public List<CustomerCollectDynamic> selectCustomerCollectDynamicList(CustomerCollectDynamic customerCollectDynamic)
    {
        return customerCollectDynamicMapper.selectCustomerCollectDynamicList(customerCollectDynamic);
    }

    // 查询数量
    public int countCustomerDynamicByCustomerId(Long customerId) {
        return customerCollectDynamicMapper.countCustomerDynamicByCustomerId(customerId);
    }

    // 查询数量
    public int countCustomerDynamicByDynamicId(Long dynamicId) {
        return customerCollectDynamicMapper.countCustomerDynamicByDynamicId(dynamicId);
    }

    // 查询数量
    public int countCustomerDynamicById(Long customerId, Long dynamicId) {
        return customerCollectDynamicMapper.countCustomerDynamicById(customerId, dynamicId);
    }

    // 单个删除
    public int deleteCustomerDynamicById(Long customerId, Long dynamicId) {
        return customerCollectDynamicMapper.deleteCustomerDynamicById(customerId, dynamicId);
    }

    // 批量删除
    public int deleteCustomerDynamic(Long[] customerIds){
        return  customerCollectDynamicMapper.deleteCustomerDynamic(customerIds);
    }

    // 批量新增
    public int batchCustomerDynamic(List<CustomerCollectDynamic> customerDynamicList){
        return  customerCollectDynamicMapper.batchCustomerDynamic(customerDynamicList);
    }

}
